import java.util.LinkedList;

public class Test {

	private LinkedList<String> questions;
	private LinkedList<String> answers;

	public Test(){
		questions = null;
		answers = null;
	}
	
	public Test(LinkedList<String> newQuestions, LinkedList<String> newAnswers){
		questions = newQuestions;
		answers = newAnswers;
	}
	
	public void addQuestion(String newQuestion){
		questions.add(newQuestion);
	}
	
	public void addAnswer(String newAnswer){
		answers.add(newAnswer);
	}
	
	public String deleteQuestion(int key){
		String tempNode = questions.remove(key);
		
		if(tempNode == null){
			System.out.println("Nothing to remove");
			return null;
		}else{
			return tempNode;
		}
	}
	
	public String deleteAnswer(int key){
		String tempNode = answers.remove(key);
		
		if(tempNode == null){
			System.out.println("Nothing to remove");
			return null;
		}else{
			return tempNode;
		}		
	}	
}
